/*
 * @Author: 1453937336@qq.com 1453937336@qq.com
 * @Date: 2024-05-22 10:07:37
 * @LastEditors: 1453937336@qq.com 1453937336@qq.com
 * @LastEditTime: 2024-05-30 17:47:17
 * @FilePath: \itforce-hris\src\api\recruitment\index.ts
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import service from "@/utils/request";

// 候选人-分页查询列表，不传每页大小默认10条
export function queryResumePage(params: {}) {
    return service({
        url: `/itf/recruitment/web/candidate/page`,
        method: "get",
        params,
    });
}

// 候选人-查询列表
export function queryCandidatePage(params: {}) {
    return service({
        url: `/itf/recruitment/web/candidate`,
        method: "get",
        params,
    });
}

// 候选人-新增
export function PostAddResume(data: {}) {
    return service({
      url: `/itf/recruitment/web/candidate`,
      method: "post",
      data,
    });
}

// 候选人-根据uuid查询详情
export function GetCandidateUuid(uuid: any) {
    return service({
      url: `/itf/recruitment/web/candidate/uuid/${uuid}`,
      method: "get",
    });
}

// 候选人-根据uuid删除
export function DeleteCandidate(uuid: any) {
    return service({
      url: `/itf/recruitment/web/candidate/uuid/${uuid}`,
      method: "delete",
    });
}

// 候选人-根据uuid修改
export function PutCandidate(uuid: any, data: any) {
    return service({
      url: `/itf/recruitment/web/candidate/uuid/${uuid}`,
      method: "put",
      data
    });
}

// 候选人标签-查询列表
export function queryCandidateTag(params: {}) {
    return service({
        url: `/itf/recruitment/web/candidate/tag`,
        method: "get",
        params,
    });
}

// 候选人标签-新增
export function PostCandidateTag(data: {}) {
    return service({
        url: `/itf/recruitment/web/candidate/tag`,
        method: "post",
        data,
    });
}

// 候选人标签分配-根据候选人id查询列表
export function queryTagByCandidateId(candidateId: any) {
    return service({
        url: `/itf/recruitment/web/candidate/tag/assignment/by_candidate_id/${candidateId}`,
        method: "get",
    });
}

// 候选人标签分配-新增
export function PostTagAdd(data: any) {
    return service({
        url: `/itf/recruitment/web/candidate/tag/assignment`,
        method: "post",
        data,
    });
}

// 候选人标签分配-根据uuid删除
export function DeleteTagUuid(uuid: any) {
    return service({
        url: `/itf/recruitment/web/candidate/tag/assignment/uuid/${uuid}`,
        method: "delete",
    });
}

// 招聘计划-分页查询列表，不传每页大小默认10条
export function queryRecruitmentPage(params: {}) {
    return service({
        url: `/itf/recruitment/web/recruitment/plan/page`,
        method: "get",
        params,
    });
}

// 招聘计划-新增
export function PostRecruitmentAdd(data: any) {
    return service({
        url: `/itf/recruitment/web/recruitment/plan`,
        method: "post",
        data,
    });
}

// 招聘计划-根据uuid查询详情
export function GetRecruitmentUuid(uuid: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/plan/uuid/${uuid}`,
      method: "get",
    });
}

// 招聘计划-根据uuid删除
export function DeleteRecruitment(uuid: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/plan/uuid/${uuid}`,
      method: "delete",
    });
}

// 招聘计划-根据uuid修改
export function PutRecruitment(uuid: any, data: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/plan/uuid/${uuid}`,
      method: "put",
      data
    });
}

// 招聘-分页查询列表，不传每页大小默认10条
export function GetRecruitmentPage(params: {}) {
    return service({
        url: `/itf/recruitment/web/recruitment/page`,
        method: "get",
        params,
    });
}

// 招聘-不分页查询列表
export function GetRecruitmentNotPage(params: {}) {
    return service({
        url: `/itf/recruitment/web/recruitment`,
        method: "get",
        params,
    });
}

// 招聘-根据uuid查询详情
export function GetQueryRecruitmentUuid(uuid: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/uuid/${uuid}`,
      method: "get",
    });
}

// 面试-获取面试列表
export function GetInterviewList(params: {}) {
  return service({
    url: `/itf/recruitment/web/interview/page`,
    method: "get",
    params,
  });
}

// 面试-新增面试
export function AddInterview(data: {}) {
  return service({
    url: `/itf/recruitment/web/interview`,
    method: "post",
    data,
  });
}
// 面试-编辑面试
export function EditInterview(uuid: String,data: {}) {
    return service({
      url: `/itf/recruitment/web/interview/uuid/${uuid}`,
      method: "put",
      data,
    });
}
// 面试-查询详情
export function QueryInterviewDetail(uuid: String) {
  return service({
    url: `/itf/recruitment/web/interview/uuid/${uuid}`,
    method: "get",
  });
}

// 招聘-新增
export function PostRecruitmentWebAdd(data: any) {
    return service({
        url: `/itf/recruitment/web/recruitment`,
        method: "post",
        data,
    });
}

// 招聘-批量新增
export function PostRecruitmentWebBatchAdd(data: any) {
    return service({
        url: `/itf/recruitment/web/recruitment/batch`,
        method: "post",
        data,
    });
}

// 招聘-根据uuid修改
export function PutRecruitmentWeb(uuid: any, data: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/uuid/${uuid}`,
      method: "put",
      data
    });
}

// 招聘-根据候选人id查询招聘结果列表
export function GetRecruitmentByCandidateId(candidateId: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/by_candidate_id/${candidateId}`,
      method: "get"
    });
}

// 招聘-发送邮件
export function PostEmailSend(data: any) {
    return service({
      url: `/itf/recruitment/web/recruitment/offer/uuid/${data.uuid}`,
      method: "post",
      data
    });
}
